import React, { PureComponent } from 'react';
import { NavLink, withRouter } from 'react-router-dom';
import "./footer.scss";
class Footer extends PureComponent {
    render() {
        const {pathname} = this.props.location;
        return <>
            {
                pathname === "/main"|| pathname ==="/category"|| pathname ==="/cart"|| pathname ==="/me"?
                <div className="nav">
                <NavLink to="/main"><div className="iconfont icon-shangdian"></div><div>首页</div></NavLink>
                <NavLink to="/category"><div className="iconfont icon-leimupinleifenleileibie"></div><div>分类</div></NavLink>
                <NavLink to="/cart"><div className="iconfont icon-gouwuchekong"></div><div>购物车</div></NavLink>
                <NavLink to="/me"><div className="iconfont icon-biaoqiankuozhan_wode-160"></div><div>我的</div></NavLink>
            </div>:""
            }
        
        </>
    }
}

export default withRouter(Footer);